<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
            //创建数组
            //创建空数组
            var arr1 = [];
            var arr2  = new Array();
            console.log(arr1,arr2);
            //2. 创建并初始化元素
            var arr3 = [1,2,"3",true];
            var arr4 = new Array(1,2,3);
            console.log(arr3,arr4);
            //3.
            var arr5 = [10];
            var arr6 = new Array(5);
            console.log(arr5,arr6);
            //4.数组添加元素
            arr6[0] = 10;
            arr6[1] = "100";
            arr6[10] = 200;
            console.log(arr6);

            
    </script>
</head>
<body>
    
</body>
</html>